﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Insert_WorkByWorker.aspx.cs"
    Inherits="CarServiseSite.Insert_WorkByWorker" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <script src="http://code.jquery.com/jquery-1.4.4.js"></script>
    <link href="./style-template.css" rel="stylesheet" type="text/css">
    <title></title>
</head>
<body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor="#FFFFFF">
    <form id="form1" runat="server">
    <div>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td valign="top" width="542">
                        <img src="./images/pic01.jpg" height="131" width="542">
                    </td>
                    <td height="131" valign="top" align="left">
                        <img src="./images/logo.gif" height="131" width="228">
                    </td>
                </tr>
                <tr valign="top">
                    <td colspan="2" height="41">
                        <table width="770" border="0" cellpadding="0" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td width="1%">
                                        <img src="./images/SPACER.GIF" height="41" width="12">
                                    </td>
                                    <td valign="middle" width="99%">
                                        <asp:Menu ID="Menu3" runat="server" BorderStyle="Ridge" BorderWidth="1px" ItemWrap="True"
                                            Orientation="Horizontal" StaticSubMenuIndent="">
                                            <DynamicMenuItemStyle BorderStyle="Double" BorderWidth="1px" />
                                            <DynamicItemTemplate>
                                                <%# Eval("Text") %>
                                            </DynamicItemTemplate>
                                            <Items>
                                                <asp:MenuItem NavigateUrl="~/UserDuscount_Manager_Worker.aspx" Text="Подсчет скидки"
                                                    Value="Calc discount"></asp:MenuItem>
                                                <asp:MenuItem NavigateUrl="~/Clients_Admin.aspx" Text="Клиенты" Value="Clients">
                                                </asp:MenuItem>
                                                <asp:MenuItem NavigateUrl="~/Insert_WorkByWorker.aspx" Text="Акты ремонта" Value="Акты ремонта">
                                                </asp:MenuItem>
                                                <asp:MenuItem NavigateUrl="~/ToDoList_Worker.aspx" Text="Список заданий" Value="Список заданий">
                                                </asp:MenuItem>
                                            </Items>
                                            <StaticMenuItemStyle BackColor="#185490" Font-Bold="True" ForeColor="White" Height="60px"
                                                HorizontalPadding="10px" />
                                            <StaticMenuStyle Width="758px" />
                                        </asp:Menu>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
        <table height="100%" width="770" bgcolor="185490" border="0" cellpadding="2" cellspacing="1">
            <tbody>
                <tr>
                    <td height="40" valign="middle" align="left" bgcolor="2792FF">
                        Акты ремонта
                        <div align="right">
                            <asp:Button ID="ButtonExit" runat="server" Text="Выход" onclick="ButtonExit_Click" />
                        </div>
                    </td>
                </tr>
                <tr>
                    <td valign="top" align="left" bgcolor="DAECFF">
                        <table class="text" height="100%" width="95%" border="0" cellpadding="5" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td valign="top">
                                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
                                            AutoGenerateColumns="False" DataSourceID="ViewDS" EnableModelValidation="True"
                                            BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px"
                                            CellPadding="3">
                                            <Columns>
                                                <asp:BoundField DataField="Cost" HeaderText="Цена" SortExpression="Cost" />
                                                <asp:BoundField DataField="WorkDate" HeaderText="Дата" SortExpression="WorkDate" />
                                                <asp:BoundField DataField="Login" HeaderText="Логин клиента" SortExpression="Login" />
                                                <asp:BoundField DataField="Login1" HeaderText="Логин работника" SortExpression="Login1" />
                                                <asp:BoundField DataField="Name" HeaderText="Название операции" SortExpression="Name" />
                                            </Columns>
                                            <FooterStyle BackColor="White" ForeColor="#000066" />
                                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                                            <RowStyle ForeColor="#000066" />
                                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                                        </asp:GridView>
                                        <asp:SqlDataSource ID="ViewDS" runat="server" ConnectionString="<%$ ConnectionStrings:CarServiceConnectionString %>"
                                            SelectCommand="ServicesMonitor" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
                                        <br />
                                        <div id="clickme">
                                            Добавление заказа
                                        </div>
                                        <br />
                                        <div id="updown">
                                        <table>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label1" runat="server" Text="Login клиента"></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                                </td>
                                                <td>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Поле должно быть не пустым"
                                                        ControlToValidate="TextBox1" ValidationGroup="1"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label3" runat="server" Text="Название процедуры"></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
                                                </td>
                                                <td>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Поле должно быть не пустым"
                                                        ControlToValidate="TextBox3" ValidationGroup="1"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label4" runat="server" Text="Дата исполнения"></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
                                                </td>
                                                <td>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Поле должно быть не пустым"
                                                        ControlToValidate="TextBox4" ValidationGroup="1"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:Label ID="Label5" runat="server" Text="Цена"></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
                                                </td>
                                                <td>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Поле должно быть не пустым"
                                                        ControlToValidate="TextBox5" ValidationGroup="1"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                        </table>
                                        <br />
                                        <asp:Button ID="Button1" ValidationGroup=1 runat="server" Text="Добавить" OnClick="Button1_Click" />
                                        <br />
                                        </div>

                                        <script>
                                            $("#clickme").click(function () {
                                                $("#updown").slideToggle("slow");
                                            });
                                        </script>
                                        <script>
                                            $('#updown').hide();
                                        </script>

                                        <br />
                                        <div id="clickme1">
                                            Смена статуса заказа
                                        </div>
                                        <br />
                                        <div id="updown1">
                                            <table>
                                                <tr>
                                                    <td>
                                                        Идентификатор операции:
                                                    </td>
                                                    <td>
                                                        <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                                                    </td>
                                                    <td>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Поле пусто"
                                                            ControlToValidate="TextBox5" ValidationGroup="2"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        Новый статус
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="StatusTypeDS" DataTextField="Description"
                                                            DataValueField="Description">
                                                        </asp:DropDownList>
                                                        <asp:SqlDataSource ID="StatusTypeDS" runat="server" ConnectionString="<%$ ConnectionStrings:CarServiceConnectionString %>"
                                                            SelectCommand="SELECT [Description] FROM [StatusType]"></asp:SqlDataSource>
                                                    </td>
                                                    <td>
                                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="DropDownList1"
                                                            ErrorMessage="Поле пусто" ValidationGroup="2"></asp:RequiredFieldValidator>
                                                    </td>
                                                </tr>
                                            </table>
                                            <asp:Button ID="Button2" ValidationGroup=2 runat="server" Text="Поменять статус" OnClick="Button2_Click" />
                                        </div>
                                        <script>
                                            $("#clickme1").click(function () {
                                                $("#updown1").slideToggle("slow");
                                            });
                                        </script>
                                        <script>
                                            $('#updown1').hide();
                                        </script>
                                        <br />
                                        <asp:Label ID="ErrorLabel" runat="server" Text=""></asp:Label>
                                    </td>
                                </tr>
                                <tr>
                                    <td height="25" valign="bottom" align="center">
                                        Powered by Fifth Wheel 2011.
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
    </form>
</body>
</html>
